<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!--nav导航栏-->
<nav class="navbar navbar-inverse  navbar-fixed-top" role="navigation">
	<button type="button" class="navbar-toggle" data-toggle="collapse"
		data-target="#a">
		<span class="icon-bar"></span> <span class="icon-bar"></span> <span
			class="icon-bar"></span>

	</button>
	<div class="container-fluid">
		<div class="navbar-header">
			<a class="navbar-brand" href="index.html">PETCLUB</a>
		</div>
		<div>
			<ul class="nav navbar-nav collapse navbar-collapse" id="a">
				<li class="active"><a href="index.html">首页</a></li>
				<li><a
					href="http://localhost:8080/distribute-portal/collection/collection.html">收藏夹</a></li>
				<li><a
					href="http://localhost:8080/distribute-portal/userhome/user-home.html">我的家园</a></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown"> <i
						class="glyphicon glyphicon glyphicon-list"></i> <b class="caret"></b>
				</a> <%-- 							二、使用JSTL标签fmt:message
引入jstl中的fmt标签
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
1
使用fmt:setBundle加载properties文件
<!-- basename为不带properties扩展名的文件名；var为存储该配置文件的变量名 -->
<fmt:setBundle basename="systemInfo" var="sysInfo" /> // 
1
2
使用fmt:message读取配置值
<!-- key为配置文件中的属性名；var为存储该配置值的变量名；bundle为上一步中存储配置文件的变量名 -->
<fmt:message key="AppName" var="appName" bundle="${sysInfo}" /> 
1
2
使用EL表达式读取配置值
<!-- 上一步中存储配置值的变量名 -->
${appName} --%>
					<ul class="dropdown-menu iconDrop"
						style="background-color: ghostwhite">
						<li class="login_message" style=""><a
							href="http://localhost:8080/distribute-sso/page/login"><i
								class="glyphicon glyphicon-log-in"></i>&nbsp;&nbsp;登陆</a></li>
						<li class="divider"></li>
						<li class="" style=""><a
							href="http://localhost:8080/distribute-sso/page/register"><i
								class="glyphicon glyphicon-registration-mark"></i>&nbsp;&nbsp;注册</a></li>
					</ul></li>
			</ul>


		</div>
	</div>
</nav>
<script>
	$(function() {
		$('.searchBtn')
				.click(
						function() {
							/* <!-- 2.获取用户输入的查询参数，并绑定到请求数据中 --> */
							var searchInput = $('.searchInput').val();
							window.location.href = 'http://localhost:8080/distribute-portal/search.html?q='
									+ searchInput;
							/* $.ajax({
								url : 'search.html?q=' 8+ searchInput,
								success : function(data, textStatus, jqXHR) {
								},
								error : function(xhr, textStatus) {
									alert('search error');
								},
							}); */
						});
	});
</script>